s1,c1 = map(int,input().split()[1:])
s2,c2 = map(int,input().split()[1:])
s3,c3 = map(int,input().split()[1:])
s4,c4 = map(int,input().split()[1:])
s5,c5 = map(int,input().split()[1:])

gpa = 0
score =s1
gpa += c1*4.0*(90 if score > 90 else score)/90
score =s2
gpa += c2*4.0*(90 if score > 90 else score)/90
score =s3
gpa += c3*4.0*(90 if score > 90 else score)/90
score =s4
gpa += c4*4.0*(90 if score > 90 else score)/90
score =s5
gpa += c5*4.0*(90 if score > 90 else score)/90
gpa /= (c1+c2+c3+c4+c5)
print(f"GPA:{gpa:.2f}")
